package com.training.java.core.junit;

public class Car {

	// State/field/instant variables
	private int vinNumber;
	private String make;
	private String model;
	// private String color;
	// private int gear;
	private boolean started;
	private int maxSpeed;
	private int currentSpeed;

	Car(int vinNumber, String make, boolean started,int maxSpeed) {

		this.vinNumber = vinNumber;
		this.make = make;
		this.started = started;
		this.maxSpeed = maxSpeed;
	}

	// Start Method() to know the car status

	public boolean start() {
		System.out.println("car has started true/false: " + started);

		if (started == false) {
			System.out.println("car has started : " + started);
			started = true;
		}
		return started;
	}

	
	// Set the currentSpeed = maxSpeed if the currentSpeed is 0
	
	public int accelerate()

	{
		if (currentSpeed == 0) {
			
			currentSpeed = currentSpeed+50;
		}
		return currentSpeed;
	}

	
	
	
	
	// setting the vinNumber

	public void setVinNumber(int vinNumber) {
		this.vinNumber = vinNumber;

	}

	// Getting the vinNumber that has been set to BMW.
	public int getVinNumber() {

		return vinNumber;

	}

	public boolean isStarted() {
		return started;
	}

	public void setStarted(boolean started) {
		this.started = started;
	}

	public String getMake() {
		return make;
	}

	public String getModel() {
		return model;
	}

	public int getMaxSpeed() {
		return maxSpeed;
	}

	public int getCurrentSpeed() {
		return currentSpeed;
	}

}
